﻿//created by Mai

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace DataAccessLayer
{
   
    public class CategoryDAL
    {
        StationeryInventoryEntities1 ent;

        public CategoryDAL()
        {
            ent = new StationeryInventoryEntities1();
        }

        public List<Category> getCategoryList()
        {
            var categoryList = (from s in ent.Categories select s);
            return categoryList.ToList();
            
        }

        public List<Stationery> getItemListByCatID(int catID)
        {
            var itemList = (from s in ent.Stationeries where s.CategoryID==catID select s);
            return itemList.ToList();
        }

       
      
    }
}
